<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>溢出问题</title>
    <style>
        body > div {
            width: 200px;
            height: 200px;
            border: 1px solid red;
            /*设置超出的部分：显示(默认)visible/隐藏hidden/滚动显示scroll*/
            overflow: scroll;
        }

        body > img {
            width: 100px;
            /*设置行内元素垂直对齐方式*/
            /*top上对齐、middle中间对齐、*/
            vertical-align: middle;
        }
    </style>
</head>
<body>
<input type="text" style="background-color: #0AA1ED">
<img src="../3.jpg" alt="">
<div>
    <img src="../3.jpg" alt="">
</div>
</body>
</html>